package com.yonyou.hxjy.enums;



public interface DingtalkConstant {
    String OA_HTTPS = "https://oapi.dingtalk.com";

    String API_HTTPS = "https://api.dingtalk.com";

    //获取token的接口请求
    String GET_TOKEN = OA_HTTPS + "/gettoken?appkey=%s&appsecret=%s";

    String GET_USER_TOKEN = API_HTTPS +"/v1.0/oauth2/userAccessToken";

    String GET_OAUTH2_TOKEN = API_HTTPS + "/v1.0/oauth2/accessToken";


    // 获取部门列表
    String LISTSUB_DEPT = OA_HTTPS + "/topapi/v2/department/listsub?access_token=%s";

    //获取部门详情
    String GET_DEPT_BY_ID = OA_HTTPS + "/topapi/v2/department/get?access_token=%s";

    // 创建部门
    String CREAETE_DEPT = OA_HTTPS + "/topapi/v2/department/create?access_token=%s";

    String DELETE_DEPT = OA_HTTPS + "/topapi/v2/department/delete?access_token=%s";

    // 部门更新
    String UPDATE_DEPT = OA_HTTPS + "/topapi/v2/department/update?access_token=%s";
    // 创建代办
    String CREATE_TASK = API_HTTPS + "/v1.0/todo/users/%s/tasks?operatorId=%s";

    String TASK_QUERY= API_HTTPS +"/v1.0/todo/users/%s/org/tasks/query";
    // 完成代办 PUT /v1.0/todo/users/{unionId}/tasks/{taskId}?operatorId=String HTTP/1.1
    String DONE_TASK = API_HTTPS + "/v1.0/todo/users/%s/tasks/%s";
    // 删除代办 PUT /v1.0/todo/users/{unionId}/tasks/{taskId}?operatorId=String HTTP/1.1
    String DELET_TASK = API_HTTPS + "/v1.0/todo/users/%s/tasks/%s?operatorId=%s";

    // 发送工作通知
    String SEND_WORK_MSG = OA_HTTPS + "/topapi/message/corpconversation/asyncsend_v2?access_token=%s";

    // 根据手机号获取用户ID
    String GET_BY_MOBILE = OA_HTTPS + "/topapi/v2/user/getbymobile?access_token=%s";

    // 获取用户
    String GET_BY_USER_ID = OA_HTTPS + "/topapi/v2/user/get?access_token=%s";
    // 创建用户
    String CREATE_USER = OA_HTTPS + "/topapi/v2/user/create?access_token=%s";

    String USER_UPDATE = API_HTTPS + "/v1.0/hrm/processes/transfer?x-acs-dingtalk-access-token=%s";

    // oauth 部分
    // 根据临时code获得 用户unid
    String  GET_TMP_AUTH_CODE = OA_HTTPS +  "/sns/getuserinfo_bycode?accessKey=%s&timestamp=%s&signature=%s";

    String GET_USER_INFO_BY_CODE = OA_HTTPS + "/topapi/v2/user/getuserinfo?access_token=%s";

    String GET_USER_INFO_BY_CODE_NEW = API_HTTPS + "/v1.0/contact/users/%s";


    //======================================钉钉考勤==============================================

    //-------------假勤审批模块
    String ATTENDANCE_APPROVE = OA_HTTPS + "/topapi/attendance/approve/finish?access_token=%s";

    public static final String ATTENDANCE_APPROVE_CANCEL = OA_HTTPS+"/topapi/attendance/approve/cancel?access_token=%s";

    public static  final String AUTHURL="http://alyscloud.com/saas-yonsuite-server/oauthDingtalk/oauthNew?tenantId=%s&appCode=%s&thirdUcId=%s&thirdUserId=%s&state=%s";

    public static final String DINGTALKAUTH="https://login.dingtalk.com/oauth2/auth?redirect_uri=%s&response_type=code&client_id=%s&scope=openid&state=%s&prompt=consent";

    //======================================官方OA审批-审批实例==============================================

    //获取审批实例ID
    String GET_PROCESS_INSTANCE_IDS = API_HTTPS +"/v1.0/workflow/processes/instanceIds/query";

    //获取单个审批实例详情
    String GET_PROCESS_INSTANCE_DETAILS = API_HTTPS +"/v1.0/workflow/processInstances?processInstanceId={value1}";


}
